<?php

global $DB, $USER, $OUTPUT, $CFG, $PAGE;

require_once($CFG->wwwroot . '/blocks/mamiline2/locallib.php');
require_login();

$context = context::instance_by_id(1);
$courses = enrol_get_all_users_courses($USER->id);
$PAGE->set_context($context);

echo html_writer::start_tag('html');
mamiline2\print_header();
echo html_writer::start_tag('body');
mamiline2\print_top_navbar();
mamiline2\print_left_navbar();

echo html_writer::start_div('', ['id' => 'page-wrapper']);
echo html_writer::start_div('row');
echo html_writer::tag('h3', get_string('dashboard', 'block_mamiline2'));

echo html_writer::end_div();
echo html_writer::end_div();

//Script
echo html_writer::script(null, new moodle_url($CFG->wwwroot . '/blocks/mamiline2/js/jquery.min.js'));
echo html_writer::script(null, new moodle_url($CFG->wwwroot . '/blocks/mamiline2/js/bootstrap.min.js'));
echo html_writer::script(null, new moodle_url($CFG->wwwroot . '/blocks/mamiline2/js/d3.min.js'));
echo html_writer::script(null, new moodle_url($CFG->wwwroot . '/blocks/mamiline2/js/c3.min.js'));
echo html_writer::end_tag('body');
echo html_writer::end_tag('html');